from rest_framework import serializers

from .models import *


# 重庆序列化函数
class TmsMaterialInfoSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsMaterialInfo
        fields = "__all__"

class TmsInventorySerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsInventory
        fields = "__all__"
class TmsAddInventorySerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsAddInventoryLog
        fields = "__all__"
class TmsOutInventorySerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsOutInventoryLog
        fields = "__all__"
class TmsPurchaseListSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsPurchaseList
        fields = "__all__"



# 青岛序列化函数
class TmsMaterialInfoQdSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsMaterialInfoQd
        fields = "__all__"

class TmsInventoryQdSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsInventoryQd
        fields = "__all__"
class TmsAddInventoryQdSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsAddInventoryLogQd
        fields = "__all__"
class TmsOutInventoryQdSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsOutInventoryLogQd
        fields = "__all__"
class TmsPurchaseListQdSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsPurchaseListQd
        fields = "__all__"
        
        
        
# 宝骏序列化函数
class TmsMaterialInfoBjSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsMaterialInfoBj
        fields = "__all__"

class TmsInventoryBjSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsInventoryBj
        fields = "__all__"
class TmsAddInventoryBjSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsAddInventoryLogBj
        fields = "__all__"
class TmsOutInventoryBjSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsOutInventoryLogBj
        fields = "__all__"
class TmsPurchaseListBjSerializer(serializers.ModelSerializer):
    class Meta:
        model = TmsPurchaseListBj
        fields = "__all__"

# 用于获取item项的上下限范围,对应ephm_limits表
# class EphmLimits_Serializer(serializers.ModelSerializer):
#     class Meta:
#         model = EphmLimits
#         fields = "__all__"


# # 对应ephm_limits_warning表
# class EphmLimitsWarning_Serializer(serializers.ModelSerializer):
#     class Meta:
#         model = EphmLimitsWarning
#         fields = "__all__"


# class EphmQdasFeatureSerializer(serializers.ModelSerializer):
#     class Meta:
#         model = EphmQdasFeature
#         fields = "__all__"
